package com.yi.wood.service.impl;

import com.yi.wood.dao.VerificationDao;
import com.yi.wood.entity.Verification;
import com.yi.wood.service.VerificationService;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by moyi on 2018/11/9 15:20
 *
 * @author moyi
 */
@Service
public class VerificationServiceImpl implements VerificationService {

    @Resource
    private VerificationDao verificationDao;

    @Override
    public List<Verification> getVerificationByType(int type) {
        Verification verification = new Verification();
        Example<Verification> example = Example.of(verification);
        verification.setType(type);
        return verificationDao.findAll(example);
    }
}
